﻿using Native.Sdk.Cqp.EventArgs;
using Native.Sdk.Cqp.Interface;

namespace github.heerheer.card2.UI
{
    public class Menu_Open : IMenuCall
    {
        public static long fromQQ { get; set; }

        public void MenuCall(object sender, CQMenuCallEventArgs e)
        {
            e.CQLog.Info("尝试载入窗口...");
            fromQQ = e.CQApi.GetLoginQQ().Id;
            if (MainWindow.mainWindow == null)
            {
                MainWindow.mainWindow = new MainWindow();
                MainWindow.mainWindow.Show();
            }
            else
            {
                MainWindow.mainWindow.Activate();
            }
        }
    }
}